<?php

    session_start();
    echo "Login: ".$_SESSION["userID"]." ".$_SESSION["userType"];
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    if(isset($_SESSION["userID"]) && !strcmp($_SESSION["userType"], "seller")){

    $productID =$_GET["productID"];

    $con = mysql_connect("localhost", "zhouzhao", "19831022");
    if(!$con){
        die("could not connect to DB: ".mysql_error());
    }

    mysql_select_db("cloudcom", $con);

    mysql_query("delete from products where productID = $productID");

    mysql_close($con);

    echo "$productID";
    }else{
        require 'login.html';
    }
?>
